﻿using System;
using System.IdentityModel.Selectors;
using System.IdentityModel.Tokens;
using System.ServiceModel;

namespace LiSA_WindowsService
{
    public class UserNameValidator : UserNamePasswordValidator
    {
        public override void Validate(string userName, string password)
        {
            if (null == userName || null == password)
            {
                throw new ArgumentNullException();
            }

            var validated = true;

            if (!validated)
            {
                throw new SecurityTokenException(string.Format("Incorrect username or password."));
            }
        }
    }
}
